# -*- coding: utf-8 -*-


class ModuleFlags:
    """Flags passed to g_module_open().
Note that these flags are not supported on all platforms."""
    LAZY = 1
    LOCAL = 2
    MASK = 3

def module_build_path(directory=None, module_name=None):
    """    A portable way to build the filename of a module. The platform-specific
    prefix and suffix are added to the filename, if needed, and the result
    is added to the directory, using the correct separator character.
    
    The directory should specify the directory where the module can be found.
    It can be %NULL or an empty string to indicate that the module is in a
    standard platform-specific directory, though this is not recommended
    since the wrong module may be found.
    
    For example, calling g_module_build_path() on a Linux system with a
    @directory of `/lib` and a @module_name of "mylibrary" will return
    `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the
    directory it will return `\Windows\mylibrary.dll`.
    @param directory: the directory where the module is. This can be     %NULL or the empty string to indicate that the standard platform-specific     directories will be used, though that is not recommended
    @param module_name: the name of the module
    @type directory: str
    @type module_name: str
    @returns: the complete path of the module, including the standard library
     prefix and suffix. This should be freed when no longer needed
    @rtype: str
    """
    return object

def module_error():
    """    Gets a string describing the last module error.
    @returns: a string describing the last module error
    @rtype: str
    """
    return object

def module_supported():
    """    Checks if modules are supported on the current platform.
    @returns: %TRUE if modules are supported
    @rtype: bool
    """
    return object


class Module():
    """The #GModule struct is an opaque data structure to represent a
[dynamically-loaded module][glib-Dynamic-Loading-of-Modules].
It should only be accessed via the following functions."""
    
    def close(self):
        """        Closes a module.
        @returns: %TRUE on success
        @rtype: bool
        """
        return object
    
    def make_resident(self):
        """        Ensures that a module will never be unloaded.
        Any future g_module_close() calls on the module will be ignored.
        @returns: 
        @rtype: None
        """
        return object
    
    def name(self):
        """        Returns the filename that the module was opened with.
        
        If @module refers to the application itself, "main" is returned.
        @returns: the filename of the module
        @rtype: str
        """
        return object
    
    def symbol(self, symbol_name=None, symbol=None):
        """        Gets a symbol pointer from a module, such as one exported
        by #G_MODULE_EXPORT. Note that a valid symbol can be %NULL.
        @param symbol_name: the name of the symbol to find
        @param symbol: returns the pointer to the symbol value
        @type symbol_name: str
        @type symbol: gpointer
        @returns: %TRUE on success
        @rtype: bool
        """
        return object
    @staticmethod
    def build_path(directory=None, module_name=None):
        """        A portable way to build the filename of a module. The platform-specific
        prefix and suffix are added to the filename, if needed, and the result
        is added to the directory, using the correct separator character.
        
        The directory should specify the directory where the module can be found.
        It can be %NULL or an empty string to indicate that the module is in a
        standard platform-specific directory, though this is not recommended
        since the wrong module may be found.
        
        For example, calling g_module_build_path() on a Linux system with a
        @directory of `/lib` and a @module_name of "mylibrary" will return
        `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the
        directory it will return `\Windows\mylibrary.dll`.
        @param directory: the directory where the module is. This can be     %NULL or the empty string to indicate that the standard platform-specific     directories will be used, though that is not recommended
        @param module_name: the name of the module
        @type directory: str
        @type module_name: str
        @returns: the complete path of the module, including the standard library
     prefix and suffix. This should be freed when no longer needed
        @rtype: str
        """
        return object
    @staticmethod
    def error():
        """        Gets a string describing the last module error.
        @returns: a string describing the last module error
        @rtype: str
        """
        return object
    @staticmethod
    def open(file_name=None, flags=None):
        """        Opens a module. If the module has already been opened,
        its reference count is incremented.
        
        First of all g_module_open() tries to open @file_name as a module.
        If that fails and @file_name has the ".la"-suffix (and is a libtool
        archive) it tries to open the corresponding module. If that fails
        and it doesn't have the proper module suffix for the platform
        (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding
        module will be opended. If that fails and @file_name doesn't have the
        ".la"-suffix, this suffix is appended and g_module_open() tries to open
        the corresponding module. If eventually that fails as well, %NULL is
        returned.
        @param file_name: the name of the file containing the module, or %NULL     to obtain a #GModule representing the main program itself
        @param flags: the flags used for opening the module. This can be the     logical OR of any of the #GModuleFlags
        @type file_name: str
        @type flags: ModuleFlags
        @returns: a #GModule on success, or %NULL on failure
        @rtype: Module
        """
        return object
    @staticmethod
    def supported():
        """        Checks if modules are supported on the current platform.
        @returns: %TRUE if modules are supported
        @rtype: bool
        """
        return object
